﻿Public Class RparametroSistDet

    Public Shared Function SeleccionarTodoXParametroSist(ByVal descEmpresa As String, ByVal idParametroSist As Int32) As List(Of EparametroSistDet)
        Dim opciones As List(Of EparametroSistDet) = Nothing

        Dim options As New TransactionOptions
        options.IsolationLevel = Transactions.IsolationLevel.ReadCommitted
        options.Timeout = New TimeSpan(0, 2, 0)

        Using scope As New TransactionScope(TransactionScopeOption.Required, options)
            Try
                opciones = DparametroSistDet.SeleccionarTodoXParametroSist(descEmpresa, idParametroSist)
                scope.Complete()
            Catch ex As Exception
                Throw
            End Try
        End Using

        Return opciones
    End Function
    Public Shared Function Añadir(ByVal descEmpresa As String, ByVal ent As EparametroSistDet) As Boolean
        Dim resultado As Boolean = False

        Dim options As New TransactionOptions
        options.IsolationLevel = Transactions.IsolationLevel.ReadCommitted
        options.Timeout = New TimeSpan(0, 2, 0)

        Using scope As New TransactionScope(TransactionScopeOption.Required, options)
            Try
                resultado = DparametroSistDet.Añadir(descEmpresa, ent)
                scope.Complete()
            Catch ex As Exception
                Throw
            End Try
        End Using

        Return resultado
    End Function
    Public Shared Function Editar(ByVal descEmpresa As String, ByVal ent As EparametroSistDet) As Boolean
        Dim resultado As Boolean = False

        Dim options As New TransactionOptions
        options.IsolationLevel = Transactions.IsolationLevel.ReadCommitted
        options.Timeout = New TimeSpan(0, 2, 0)

        Using scope As New TransactionScope(TransactionScopeOption.Required, options)
            Try
                resultado = DparametroSistDet.Editar(descEmpresa, ent)
                scope.Complete()
            Catch ex As Exception
                Throw
            End Try
        End Using

        Return resultado
    End Function

End Class
